#include <iostream>

double getDouble() {
    double x{};
    do {
        if (std::cin.fail()) {
            std::cout << "That isn`t a valid number, try again" << "\n";
            std::cin.clear();
            std::cin.ignore(std::numeric_limits<std::streamsize>::max(), "\n");
        }
        std::cin >> x;
    } while (std::cin.fail());
    return x;
}

int main() {
    std::cout << "Input a number: ";
    double x{  };
    std::cout << "Input another number: ";
    double y{  };
    std::cout << x << "+" << y << "=" << x + y << "\n";
    std::cout << x << "-" << y << "=" << x - y << "\n";
    
    return 0;
}